package org.jeecg.modules.hc.entity;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.modules.hc.enums.HcOrderStateEnum;
import org.jeecg.modules.hc.enums.HcPaymentMethodEnum;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Description: 订单
 * @Author: jeecg-boot
 * @Date: 2022-12-13
 * @Version: V1.0
 */
@Data
@TableName("hc_order")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "hc_order对象", description = "订单")
public class HcOrder implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    @ApiModelProperty(value = "微信支付对象")
    private HcWxPay hcWxPay;

    @TableField(exist = false)
    @ApiModelProperty(value = "支付宝支付对象")
    private HcAliPay hcAliPay;

    @TableField(exist = false)
    @ApiModelProperty(value = "微信支付类型")
    private String wxPayType;

    @TableField(exist = false)
    @ApiModelProperty(value = "下单备注")
    private JSONObject remarksObj;

    @TableField(exist = false)
    @ApiModelProperty(value = "订单ID集合")
    private List<String> ids;

    @TableField(exist = false)
    @ApiModelProperty(value = "购物车ID列表")
    @NotNull(message = "购物车ID不能为空")
    @Size(min = 1, message = "购物车ID数量不能小于1")
    private List<String> shoppingCartIds;

    @TableField(exist = false)
    @ApiModelProperty(value = "菜品名称")
    private java.lang.String nameDishes;

    @TableField(exist = false)
    @ApiModelProperty(value = "手机号")
    private java.lang.String phone;

    @TableField(exist = false)
    @ApiModelProperty(value = "取餐序号")
    private java.lang.Integer pickingSerialNo;

    @TableField(exist = false)
    @ApiModelProperty(value = "地址ID")
    private java.lang.String addressId;

    @TableField(exist = false)
    @ApiModelProperty(value = "取餐地址")
    private java.lang.String pickingAddress;

    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private java.lang.String id;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;

    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
    /**
     * 用户ID
     */
    @Excel(name = "用户ID", width = 15)
    @ApiModelProperty(value = "用户ID")
    private java.lang.String userId;
    /**
     * 支付方式
     */
    @Excel(name = "支付方式", width = 15)
    @ApiModelProperty(value = "支付方式")
    private HcPaymentMethodEnum paymentMethod;
    /**
     * 支付ID
     */
    @Excel(name = "支付ID", width = 15)
    @ApiModelProperty(value = "支付ID")
    private java.lang.String paymentId;
    /**
     * 付款时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "付款时间")
    private Date payTime;
    /**
     * 状态
     */
    @ApiModelProperty(value = "状态")
    private HcOrderStateEnum state;
    /**
     * 分享的用户ID
     */
    @Excel(name = "分享的用户ID", width = 15)
    @ApiModelProperty(value = "分享的用户ID")
    private java.lang.String shareUserId;
    /**
     * 发放奖励的钱包记录ID
     */
    @Excel(name = "发放奖励的钱包记录ID", width = 15)
    @ApiModelProperty(value = "发放奖励的钱包记录ID")
    private java.lang.String walletId;
    /**
     * 骑手
     */
    @Excel(name = "骑手", width = 15)
    @ApiModelProperty(value = "骑手")
    private java.lang.String riderId;
    /**
     * 付款钱包ID
     */
    @Excel(name = "付款钱包ID", width = 15)
    @ApiModelProperty(value = "付款钱包ID")
    private java.lang.String paymentWalletId;
    /**
     * 付款信息
     */
    @Excel(name = "付款信息", width = 15)
    @ApiModelProperty(value = "付款信息")
    private java.lang.String objectJson;
    /**
     * 退款ID
     */
    @Excel(name = "退款ID", width = 15)
    @ApiModelProperty(value = "退款ID")
    private java.lang.String refundId;

    /**
     * pc支付查询次数(查询10次，10次还未成功支付取消订单)
     */
    @ApiModelProperty(value = "pc支付查询次数(查询10次)")
    private java.lang.Integer callBackQueryTimes;
}
